# Author    :Dun_Hz
# Time      :2024/3/14 16:53
# 阶乘
import functools


@functools.lru_cache
def Func(n):
    if n<2:
        return n
    else:
        res = n * Func(n-1)
        return res
for i in range(1,1000):
    print(f"{i}的阶乘结果是：",Func(i))